import https from "./request";
// 前端接口集中管理
export const getPhoneData = function () {
  return https.get('/home/phonedata')
}
// 个人管理页5
/**
 * 
 * @param {object} params 账号和密码
 * @returns {String} 用户数据
 */
export const getUserList = function () {
  return https.get('/user')
}
// 个人管理页
export const getTabList = function (params) {
  return https.get('/user/getTabData', params)
}
export const addTabList = function (data) {
  return https.post('/user/addTabData', data)
}
export const delTabList = function (data) {
  return https.post('/user/delTabData', data)
}
export const upTabList = function (data) {
  return https.post('/user/upTabData', data)
}
export const getMenu = function (data) {
  console.log(data);
  return https.post('/login/getMenu', data)
}

// 订单页面

//1.订单管理页面接口
export const getOder = async function (id) {
  if (!id) {
    return await https.get(`/buyerinfo`)
  } else {
    return await https.get(`/buyerinfo/${id}`)
  }
}
